<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<div id="rightbar" class="ticker">
    <div class="heading">All Updates</div>
    <ul id="feedList">
        <c:forEach items="${feedList}" var="feed">
            <c:if test="${feed.type == 'LiveLocationFeed'}">
                <li>
                    <div class="targetTickerFeed">
                        <c:if test="${feed.typeOfAttendant == 'ATHLETE'}">
                            <a href="/norsemanserver/profile?username=<c:out value = "${feed.username}"/>&typeOfBrowse=feed&routeId=<c:out value="${routeId}"/>"
                               style="padding-right:10px;float:left;">
                                <img width="30px" height="30px" src='<c:out value = "${feed.profilePicture}"/>'
                                     alt='<c:out value = "${feed.username}"/>'/>
                            </a>
                        </c:if>
                        <c:if test="${feed.typeOfAttendant == 'SUPPORT'}">
                            <a href="/norsemanserver/profile?username=<c:out value = "${feed.athleteUsername}"/>&typeOfBrowse=feed&routeId=<c:out value="${routeId}"/>"
                               style="padding-right:10px;float:left;">
                                <img width="30px" height="30px" src='<c:out value = "${feed.athleteProfilePicture}"/>'
                                     alt='<c:out value = "${feed.athleteUsername}"/>'/>
                            </a>
                        </c:if>

                        <div style="" class="feedright">
                            <c:if test="${feed.typeOfAttendant == 'ATHLETE'}">
                                <a href="/norsemanserver/profile?username=<c:out value = "${feed.username}"/>&typeOfBrowse=feed&routeId=<c:out value="${routeId}"/>"><c:out
                                        value="${feed.username}"/> </a>
                            </c:if>
                            <c:if test="${feed.typeOfAttendant == 'SUPPORT'}">
                                <a href="/norsemanserver/profile?username=<c:out value = "${feed.athleteUsername}"/>&typeOfBrowse=feed&routeId=<c:out value="${routeId}"/>"><c:out
                                        value="${feed.athleteUsername}"/> </a>
                            </c:if>

                            <div>
                                <c:out value="${feed.description}"/>
                            </div>
                        </div>
                    </div>

                </li>
                <div class="feedseparatorsmall"></div>
            </c:if>
            <c:if test="${feed.type == 'LiveMediaFeed'}">
                <li>
                    <div class="mediaTickerfeed" onclick="tickerMediaClick('${feed.relativeFilePath}')">
                        <a href="#" style="padding-right:10px;float:left;">
                            <c:if test="${feed.typeOfAttendant == 'ATHLETE'}">
                                <img width="30px" height="30px" src='<c:out value = "${feed.profilePicture}"/>'
                                     alt='<c:out value = "${feed.username}"/>'/>
                            </c:if>
                            <c:if test="${feed.typeOfAttendant == 'SUPPORT'}">
                                <img width="30px" height="30px" src='<c:out value = "${feed.athleteProfilePicture}"/>'
                                     alt='<c:out value = "${feed.athleteUsername}"/>'/>
                            </c:if>
                        </a>

                        <div style="" class="feedright">
                            <c:if test="${feed.typeOfAttendant == 'ATHLETE'}">
                                <a href="#"><c:out value="${feed.username}"/> </a>
                            </c:if>
                            <c:if test="${feed.typeOfAttendant == 'SUPPORT'}">
                                <a href="#"><c:out value="${feed.athleteUsername}"/> </a>
                            </c:if>
                            <div><c:out value="${feed.description}"/></div>
                        </div>
                    </div>

                </li>
                <div class="feedseparatorsmall"></div>
            </c:if>
        </c:forEach>
    </ul>
</div>